﻿using RotovapPlatform.Domain.Business.Recipes.Entities;

namespace RotovapPlatform.Domain.Business.Interfaces;

/// <summary>
/// 实验组仓储接口
/// </summary>
public interface IExperimentGroupRepository
{
	/// <summary>
	/// 获取所有实验组
	/// </summary>
	Task<IEnumerable<ExperimentGroup>> GetAllAsync();

	/// <summary>
	/// 根据ID获取实验组
	/// </summary>
	/// <param name="groupId">实验组ID</param>
	Task<ExperimentGroup> GetByIdAsync(Guid groupId);

	/// <summary>
	/// 添加实验组
	/// </summary>
	/// <param name="group">实验组实体</param>
	/// <param name="updateExperiments">是否更新实验数据，默认为false</param>
	Task AddAsync(ExperimentGroup group, bool updateExperiments = false);

	/// <summary>
	/// 更新实验组
	/// </summary>
	/// <param name="group">实验组实体</param>
	/// <param name="updateExperiments">是否更新实验数据，默认为false</param>
	Task UpdateAsync(ExperimentGroup group, bool updateExperiments = false);

	/// <summary>
	/// 删除实验组
	/// </summary>
	/// <param name="groupId">实验组ID</param>
	Task DeleteAsync(Guid groupId);

	/// <summary>
	/// 根据名称查找实验组
	/// </summary>
	/// <param name="groupName">实验组名称</param>
	Task<ExperimentGroup> GetByNameAsync(string groupName);

	/// <summary>
	/// 检查实验组名称是否已存在
	/// </summary>
	/// <param name="groupName">实验组名称</param>
	Task<bool> ExistsByNameAsync(string groupName);


}
